<template>
  <el-dialog :title="modalTitle" :close-on-click-modal="false" :visible.sync="dialogVisible">
    <el-form
      ref="form"
      :model="model.dataForm"
      :rules="model.dataRule"
      label-width="120px"
      @keyup.enter.native="handleSubmit"
    >
      <el-form-item label="工单类型" prop="projectName">
        <el-select v-model="model.dataForm.region" placeholder="请选择工单类型">
          <el-option :label="`${CORE.MAP.REGION}一`" value="shanghai"></el-option>
          <el-option :label="`${CORE.MAP.REGION}二`" value="beijing"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="工单描述">
        <el-input v-model="model.dataForm.desc" type="textarea"></el-input>
      </el-form-item>
      <el-form-item label="处理人">
        <el-button type="primary" @click="selectPeople">选择</el-button>
      </el-form-item>
    </el-form>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="handleClose">取消</el-button>
        <el-button>存草稿</el-button>
        <el-button type="primary" :loading="loading" @click="deal">确定</el-button>
      </span>
    </template>
    <!-- 视频选择弹窗 -->
    <form-modal ref="formModal" @sendPeople="getPeople"></form-modal>
  </el-dialog>
</template>

<script>
import index from './index'
import CORE from '@/CORE'

export default {
  name: 'FormModal1',
  /**
   * 混入（表单）
   */
  mixins: [index],
  /**
   * 组件导入 (Abc.vue + Abc/index.vue)
   */
  ...CORE.components(require.context('./', true, /vue$/)),
}
</script>

<style lang="scss" scoped>
.img-cover {
  width: 30%;
}
::v-deep {
  .deviceSelect .el-input.is-disabled .el-input__inner {
    cursor: pointer;
  }
  .el-radio-group {
    width: 100%;
  }
  .el-radio {
    display: block;
    width: 100%;
    padding: 10px;
    display: flex;
  }
  .el-radio__label {
    flex: 1;
    padding-left: 0;
  }
}
</style>
